The use of artificial neural networks is becoming more common today in a variety of applications. In a neural network array, each neuron receives a plurality of input signals. Typically, each neuron then performs a weighted summation of the input signals to generate an intermediate result. A "squashing" operation is then performed on the intermediate result in order to produce a digital output signal which has a value that falls within a predetermined range of values. That is, the intermediate result is "squashed" to fit within a smaller, predetermined range of digital output values. For example, if eight digital data bits are available to represent the digital output value, then the intermediate result must be "squashed" to fit within the range of decimal numbers--128 to 127, which can be represented by eight binary bits.
The "squashing" operation involves approximating a sigmoidal response using digital circuitry. One prior art approach approximates the sigmoid function using piecewise linear approximations. The sigmoid function is divided into a plurality of linear segments, where each linear segment can be described by an intercept value and a slope value. The digital circuitry selects the particular line segment which corresponds to a given intermediate value. The digital output value is then calculated using the intermediate value and using an intercept value and a slope value for the selected line segment.
Unfortunately, using the piecewise linear approximation approach, one or more upper and lower boundary checks (e.g. using a window comparator) must be performed in order to select which line segment should be used. Also, this approach requires a significant number of line segments in order to achieve the accuracy required by some applications. And if a large number of line segments are required, a large number of intercept values and slope values must be stored, for example in a table in memory. A more efficient approach was needed for approximating a sigmoidal response in a digital data processor.